<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
<html>  
  <head>  
    <title>权限列表</title> 
    <%@ include file="../admin/head.jsp"%> 
	<script type="text/javascript" src="../resource/js/privilege/list.js?v=10"></script>
	
  </head>  
    
  <body>  
  	
    <table id="dg" class="easyui-treegrid" data-options="fitColumns:true,fit:true,idField:'id',treeField:'privilegeName',animate:true" toolbar="#toolbar">
		<thead>
			<tr>
				<th data-options="field:'id',hidden:true">id</th>
           		<th data-options="field:'privilegeName',width:80,align:'center'">权限名称</th>
           		<th data-options="field:'privilegeUrl',width:80,align:'center'">地址URL</th>
           		<th data-options="field:'privilegeTypeStr',width:80,align:'center'">权限类型</th>
           		<th data-options="field:'privilegeType',hidden:true">权限类型(int)</th>
           		<th data-options="field:'privilegeCode',width:80,align:'center'">权限编码</th>
           		<th data-options="field:'privilegeRemark',width:80,align:'center'">备注</th>
           		<th data-options="field:'createDate',width:80,align:'center'">创建时间</th>
			</tr>
		</thead>
	</table>
    
    
    <div id="toolbar" style="text-align:left;">
   		 <a href="#" id="toAdd" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="toAdd()">新增</a>
   		 <a href="#" id="toEdit" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="toEdit()">修改</a>
   		 <a href="#" id="del" class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="del()">删除</a>
   		 <a href="#" id="ext" class="easyui-linkbutton" iconCls="icon-redo" plain="true" onclick="ext()">导出</a>
    </div>
  	
  	
  	<!-- 表单窗口 -->
  	<div id="win" class="easyui-window" style="width:330px;height:300px"
    	data-options="modal:true,closed:true,collapsible:false,minimizable:false,maximizable:false">
    	<form id="fm">
    		<input type="hidden" name="id" id="id"/>
    		<table style="margin:15 auto;" cellspacing="5">
    		 	<tr>
    				<td>权限名称：</td>
    				<td><input type="text" id="privilegeName" name="privilegeName"  class="easyui-validatebox tb" data-options="required:true,validType:'length[1,20]'"/></td>
    			</tr>
    		 	<tr>
    				<td>上级权限：</td>
    				<td><input id="privilegeParentId" name="privilegeParentId" style="width:100%;"/></td>
    			</tr>
    		 	<tr>
    				<td>地址URL：</td>
    				<td><input type="text" id="privilegeUrl" name="privilegeUrl"  class="easyui-validatebox tb" data-options="validType:'length[1,100]'"/></td>
    			</tr>
    		 	<tr>
    				<td>权限类型：</td>
    				<td>
    					<select class="easyui-combobox" name="privilegeType" id="privilegeType" labelPosition="top" style="width:100%;" editable="false" data-options="required:true">
    						<option value="1">菜单</option>
							<option value="2">按钮</option>
    					</select>
    				</td>
    			</tr>
    		 	<tr>
    				<td>权限编码：</td>
    				<td><input type="text" id="privilegeCode" name="privilegeCode" /></td>
    			</tr>
    		 	<tr>
    				<td>信息备注：</td>
    				<td><input type="text" id="privilegeRemark" name="privilegeRemark" /></td>
    			</tr>
    		</table>
    		<div style="text-align:center;">
		        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="save()" style="width:90px">保存</a>
		        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#win').window('close')" style="width:90px">取消</a>
		    </div>	
    	</form>
	</div>
  </body>  
</html>  